package com.jx.driving.request;

import java.util.Arrays;

import com.jx.driving.message.TimeTerminalRequestMessage;
import com.jx.driving.protocol.terminal.annotation.ByteArrayAnnotation;
import com.jx.driving.protocol.terminal.annotation.DwordAnnotation;
import com.jx.driving.protocol.terminal.annotation.TerminalAnnotation;

/**
 * 终端鉴权消息
 * 
 * @author shenliuyang
 *
 *         2016年8月12日下午3:30:25
 */
@TerminalAnnotation
public class Terminal0x0102Request extends TimeTerminalRequestMessage {

	private static final long serialVersionUID = -6618079060082738914L;

	@DwordAnnotation(order = 1)
	private long time;// 时间戳

	@ByteArrayAnnotation(value = 256, order = 2)
	private byte[] pass;// 密文

	public long getTime() {
		return time;
	}

	public void setTime(long time) {
		this.time = time;
	}

	public byte[] getPass() {
		return pass;
	}

	public void setPass(byte[] pass) {
		this.pass = pass;
	}

	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append("Terminal0x0102Request [time=").append(time).append(", pass=").append(Arrays.toString(pass))
				.append("]");
		return builder.toString();
	}

}
